package com.android.settings.audio.peq.peq.ui;

import java.io.File;

/**
 * Created by WinsonLi on 2017/10/19.
 */

public class MixerCallback {
    private MixerMonitor mixerMonitor;

    private MixerCallback() {
    }

    public interface MixerMonitor {
        String storageCallback(String eqName); //储存设置回调

        String importCallback(String importEqName); //导入设置回调

        boolean newSettings(boolean flag, String settingsName);//新建设定

        void resetMixerSettings();//重设

        boolean newMixerLocalSetting(String name,String localFilePath);

        void importDataToLocal(String data, File file);
    }

    public MixerMonitor getMixer() {
        return mixerMonitor;
    }

    public void setMixerLinstener(MixerMonitor eqSetLinstener) {
        this.mixerMonitor = eqSetLinstener;
    }

    private volatile static MixerCallback mixerCallback;

    public static MixerCallback getInstance() {
        if (mixerCallback == null) {
            synchronized (MixerCallback.class) {
                if (mixerCallback == null) {
                    mixerCallback = new MixerCallback();
                }
            }
        }
        return mixerCallback;
    }
}
